namespace ArtheaEngine
{
    partial class Affect
    {
        private Spell _spell;

        public Affect(int flag, Spell type, AffectType what, short modifier, short duration)
        {
            Flags = flag;
            Type = Type == null ? null : type.Name;
            Spell = type;
            Duration = duration;
            Modifier = modifier;
            What = what;
        }

        public Spell Spell
        {
            get { return _spell; }
            set
            {
                _spell = value;
                Type = value == null ? null : value.Name;
            }
        }
    }

    public enum AffectType
    {
        None,
        AC,
        Hit,
        Mana,
        Move
    }
}